From: Giovanni Campagna Date: Sat, 16 Feb 2013 16:26:28 +0000 (+0100) Subject: WindowOverlay: remove animations when relayouting X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4832 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5c7f0a0ad82fc212706557dc5cd9fb6a2ed7abd7;p=gnome-shell.git WindowOverlay: remove animations when relayouting If WindowOverlay.relayout() is called without animation, we must stop any preexisting animation, otherwise it will continue to run with the previous parameters and cause the overlay to end up in the wrong position. https://bugzilla.gnome.org/show_bug.cgi?id=693970 --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 85fae0856..85387293e 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -529,10 +529,15 @@ const WindowOverlay = new Lang.Class({ }, relayout: function(animate) { - let [cloneX, cloneY, cloneWidth, cloneHeight] = this._windowClone.slot; - let button = this.closeButton; let title = this.title; + let border = this.border; + + Tweener.removeTweens(button); + Tweener.removeTweens(title); + Tweener.removeTweens(border); + + let [cloneX, cloneY, cloneWidth, cloneHeight] = this._windowClone.slot; let layout = Meta.prefs_get_button_layout(); let side = layout.left_buttons.indexOf(Meta.ButtonFunction.CLOSE) > -1 ? St.Side.LEFT : St.Side.RIGHT;